package com.group3.exception;

import io.swagger.annotations.ApiModel;

/**
 * ExceptionEnum
 *
 * @author HY
 * 2021/06/10 15:55
 **/

@ApiModel(value = "异常枚举类")
public enum ExceptionEnum {

//    SUCCESS(200,"操作成功"),
    ERROR(201,"操作失败"),
    NULL_ERR(1000,"关键参数不能为空"),
    TOKEN_ERR(1001,"token无效"),
    AUTH_ERR(1002,"没有此操作权限"),
    TOKENINVALD(1003,"token超时已失效"),
    PASSWORD_ERR(1004,"用户名或密码错误"),
    OLD_PASSWORD_ERR(1005,"原密码错误"),
    USERTYPE_ERR(1006,"用户类型不存在"),
    DATABASE_OPERATION_ERR(1007,"数据库操作失败"),
    NOT_FIND_DETAIL(1008,"未找到此条数据"),
    UPLOAD_FILE_FAILED(1008,"上传文件失败"),
    EXCEL_ERR(1009,"请检查excel文件格式"),
    IDENTITY_ERR(1010,"登录用户身份与资源不匹配！"),
    NOT_GROUP_LEADER(1011,"你不是小组长不能提交小组作业"),
    NOTFIND(404,"未找到接口");

    private int code;

    private String msg;

    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
